/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.capex.javaee.applets;

import java.util.*;
import java.applet.Applet;
import java.awt.event.*;
import java.awt.*;

public class App1 extends Applet implements ActionListener {

    TextField t;
    Button B;

    @Override
    public void init() {
        add(new panel());
        B.addActionListener(this);
    }

    class panel extends Panel {

        public panel() {
//setSize(300,300);
            setLayout(new GridLayout(2, 2));
            add(new Label("Enter Name"));
            add(t = new TextField(20));
            add(new Label());
            add(B = new Button("send"));
        }
    }

    @Override
    public void actionPerformed(ActionEvent E) {
        App2 aref = App2.ref;
        aref.setName(t.getText());
    }
}
